% Returns updated simulatedRobot and the actual distance moved
% simulated robot is [x, y, theta]
function [simulatedRobot, actualMoveDistance] = simulator_move (simulatedRobot, simulatedReading, distance)
    actualMoveDistance = min(distance, max(simulatedReading - 1, 0));
    simulatedRobot(1) = simulatedRobot(1) + actualMoveDistance * sin(simulatedRobot(3));
    simulatedRobot(2) = simulatedRobot(2) + actualMoveDistance * cos(simulatedRobot(3));
end